package com.example.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 合并收文和发文的实体类（用于统一分页查询）
 */
public class RestrictedDocument implements Serializable {
    private static final long serialVersionUID = 1L;

    // 公共字段（两个表都存在的字段）
    private Integer id; // 主键ID（兼容bigint和int类型）
    private String senderOrg; // 来文单位/发文单位
    private String title; // 文件标题
    private String secretLevel; // 密级
    private Integer secretType; // 密件类型
    private Integer pageCount; // 文件页数
    private String handlingOrg; // 办件单位
    private String attachmentId; // 附件ID
    private Integer creator; // 创建者
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate; // 创建时间
    private Integer updater; // 更新者
    private Date updateDate; // 更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date limitDate; // 限办时间
    private Boolean feedbackRequired; // 限时反馈（0-否，1-是）
    private Integer status; // 状态

    // 统一处理状态（前端展示用，整合收文process_type和发文archive_status）
    private String processStatus; // 可能值：未处理/处理中/已存档

    private String uniqueId; // 唯一标识（用于前端展示）
    private String objectName; // 当前审批人名称（用于前端展示）
    private String nextObjectName;

    // 来源标识（区分收文/发文）
    private String sourceType; // INCOMING-收文，OUTGOING-发文

    // 收文特有字段
    private String docType; // 来文类型
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date receiveDate; // 来文日期
    private String contactPerson; // 联系人
    private String contactPhone; // 联系电话
    private String urgencyLevel; // 紧急程度
    private String documentType; // 文种/期号
    private String boxNo; // 盒号
    private Integer annual; // 年度
    private Integer copies; // 份数
    private String archiveNo; // 归档号
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date archiveDate; // 归档日期
    private String incomingProcessType; // 收文原始process_type（后端用）

    // 发文特有字段
    private Integer fileNo; // 件号
    private String recordNo; // 档号
    private String senderDocNo; // 发文编号
    private String outgoingArchiveStatus; // 发文原始archive_status（后端用）
    private String processType; // 发文处理类型

    // getter和setter方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSenderOrg() {
        return senderOrg;
    }

    public void setSenderOrg(String senderOrg) {
        this.senderOrg = senderOrg;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSecretLevel() {
        return secretLevel;
    }

    public void setSecretLevel(String secretLevel) {
        this.secretLevel = secretLevel;
    }

    public Integer getSecretType() {
        return secretType;
    }

    public void setSecretType(Integer secretType) {
        this.secretType = secretType;
    }

    public Integer getPageCount() {
        return pageCount;
    }

    public void setPageCount(Integer pageCount) {
        this.pageCount = pageCount;
    }

    public String getHandlingOrg() {
        return handlingOrg;
    }

    public void setHandlingOrg(String handlingOrg) {
        this.handlingOrg = handlingOrg;
    }

    public String getAttachmentId() {
        return attachmentId;
    }

    public void setAttachmentId(String attachmentId) {
        this.attachmentId = attachmentId;
    }

    public Integer getCreator() {
        return creator;
    }

    public void setCreator(Integer creator) {
        this.creator = creator;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getUpdater() {
        return updater;
    }

    public void setUpdater(Integer updater) {
        this.updater = updater;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getLimitDate() {
        return limitDate;
    }

    public void setLimitDate(Date limitDate) {
        this.limitDate = limitDate;
    }

    public Boolean getFeedbackRequired() {
        return feedbackRequired;
    }

    public void setFeedbackRequired(Boolean feedbackRequired) {
        this.feedbackRequired = feedbackRequired;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getProcessStatus() {
        return processStatus;
    }

    public void setProcessStatus(String processStatus) {
        this.processStatus = processStatus;
    }

    public String getSourceType() {
        return sourceType;
    }

    public void setSourceType(String sourceType) {
        this.sourceType = sourceType;
    }

    public String getDocType() {
        return docType;
    }

    public void setDocType(String docType) {
        this.docType = docType;
    }

    public Date getReceiveDate() {
        return receiveDate;
    }

    public void setReceiveDate(Date receiveDate) {
        this.receiveDate = receiveDate;
    }

    public String getContactPerson() {
        return contactPerson;
    }

    public void setContactPerson(String contactPerson) {
        this.contactPerson = contactPerson;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public String getUrgencyLevel() {
        return urgencyLevel;
    }

    public void setUrgencyLevel(String urgencyLevel) {
        this.urgencyLevel = urgencyLevel;
    }

    public String getDocumentType() {
        return documentType;
    }

    public void setDocumentType(String documentType) {
        this.documentType = documentType;
    }

    public String getBoxNo() {
        return boxNo;
    }

    public void setBoxNo(String boxNo) {
        this.boxNo = boxNo;
    }

    public Integer getAnnual() {
        return annual;
    }

    public void setAnnual(Integer annual) {
        this.annual = annual;
    }

    public Integer getCopies() {
        return copies;
    }

    public void setCopies(Integer copies) {
        this.copies = copies;
    }

    public String getArchiveNo() {
        return archiveNo;
    }

    public void setArchiveNo(String archiveNo) {
        this.archiveNo = archiveNo;
    }

    public Date getArchiveDate() {
        return archiveDate;
    }

    public void setArchiveDate(Date archiveDate) {
        this.archiveDate = archiveDate;
    }

    public String getIncomingProcessType() {
        return incomingProcessType;
    }

    public void setIncomingProcessType(String incomingProcessType) {
        this.incomingProcessType = incomingProcessType;
    }

    public Integer getFileNo() {
        return fileNo;
    }

    public void setFileNo(Integer fileNo) {
        this.fileNo = fileNo;
    }

    public String getRecordNo() {
        return recordNo;
    }

    public void setRecordNo(String recordNo) {
        this.recordNo = recordNo;
    }

    public String getSenderDocNo() {
        return senderDocNo;
    }

    public void setSenderDocNo(String senderDocNo) {
        this.senderDocNo = senderDocNo;
    }

    public String getOutgoingArchiveStatus() {
        return outgoingArchiveStatus;
    }

    public void setOutgoingArchiveStatus(String outgoingArchiveStatus) {
        this.outgoingArchiveStatus = outgoingArchiveStatus;
    }

    public String getProcessType() {
        return processType;
    }

    public void setProcessType(String processType) {
        this.processType = processType;
    }

    public String getUniqueId() {
        return uniqueId;
    }

    public void setUniqueId(String uniqueId) {
        this.uniqueId = uniqueId;
    }

    public String getObjectName() {
        return objectName;
    }

    public void setObjectName(String objectName) {
        this.objectName = objectName;
    }

    public String getNextObjectName() {
        return nextObjectName;
    }

    public void setNextObjectName(String nextObjectName) {
        this.nextObjectName = nextObjectName;
    }
}
